package fnord.jovian.tango;

import java.awt.*;
import java.awt.geom.*;
import fnord.illuminati.card.GroupCard;
import fnord.jovian.TheBoard;

public class TheMiniCard extends TheCard {

	public TheMiniCard(GroupCard card, TheCardOrientation orientation, TheCardInOut[] inOut, TheBoard board, boolean illuminati) {
		super(card,orientation,inOut,board);
		if (illuminati)
			_background = Color.BLACK;
		else
			_background = Color.BLUE;
		_shape = new RoundRectangle2D.Double(0,0,
				TheTangoConstants.MINICARDWIDTH,TheTangoConstants.MINICARDHEIGHT,
				3,3);
	}

	public TheMiniCard(String name, TheCardOrientation orientation, TheCardInOut[] inOut, TheBoard board, boolean illuminati) {
		super(name,orientation,inOut,board);
		if (illuminati)
			_background = Color.BLACK;
		else
			_background = Color.BLUE;
		_shape = new RoundRectangle2D.Double(0,0,
				TheTangoConstants.MINICARDWIDTH,TheTangoConstants.MINICARDHEIGHT,
				3,3);
	}

	public void paint(Graphics2D g) {
		g.rotate(_rotation,_shape.getCenterX(), _shape.getCenterY());
		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
		g.setColor(_background);
		g.fill(_shape);
		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
		g.rotate(-_rotation,_shape.getCenterX(), _shape.getCenterY());
	}
	
	public boolean contains(Point p){ return false; }
	public boolean containsClick(Point p){ return false; }
	public boolean containsDrag(Point p){ return false; }
	public boolean containsUp(Point p){ return false; }
}